#include<iostream>
using namespace std;

int main()
{
    int md = 1;
    int APPcode = 0;
    while (1)
    {
         cout<<"ZDEOS安装包扩展程序,v1.0\n";
         cout<<"请输入模式，安装：输入1回车，卸载：去apt卸载，程序列表和程序编号：输入2回车,退出输入3\n";
         cin>>md;
        if(md == 1)
        {
            cout<<"请输入APP编号\n";
            cin>>APPcode;
            switch (APPcode)
            {
            case 1:
                system("wget https://dldir1.qq.com/qqfile/qq/QQNT/c005c911/linuxqq_3.0.0-571_amd64.deb");
                system("sudo dpkg -i linuxqq_3.0.0-571_amd64.deb");
                system("rm -rf linuxqq_3.0.0-571_amd64.deb");
                break;
            case 2:
                system("wget https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11664/wps-office_11.1.0.11664_amd64.deb");
                system("sudo dpkg -i wps-office_11.1.0.11664_amd64.deb");
                system("rm -rf wps-office_11.1.0.11664_amd64.deb");
                break;
            case 3:
                system("wget https://dtapp-pub.dingtalk.com/dingtalk-desktop/xc_dingtalk_update/linux_deb/Release/com.alibabainc.dingtalk_1.4.0.20829_amd64.deb");
                system("sudo dpkg -i com.alibabainc.dingtalk_1.4.0.20829_amd64.deb");
                system("rm -rf com.alibabainc.dingtalk_1.4.0.20829_amd64.deb");
                break;
            case 4:
                system("wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_109.0.1518.61-1_amd64.deb?brand=M102");
                system("sudo dpkg -i microsoft-edge-stable_109.0.1518.61-1_amd64.deb");
                system("rm -rf microsoft-edge-stable_109.0.1518.61-1_amd64.deb");
                break;
            case 5:
                system("wget https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanJia/4.17.6/baidunetdisk_4.17.6_amd64.deb");
                system("sudo dpkg -i baidunetdisk_4.17.6_amd64.deb");
                system("rm -rf baidunetdisk_4.17.6_amd64.deb");
                break;
            }
        }
        if(md == 2)
        {
            cout<<"ZDEOS扩展应用程序列表:\n";
            cout<<"编号1: qq\n"<<"编号2: WPS\n"<<"编号3: 钉钉 \n"<<"编号4: edge\n"<<"编号5: 就算是5G但还是只能跑2G的百度网盘\n";
            
        }
        if(md == 3)
        {
            break;
        }
    }
}
